package com.interview.select;

public class DemoOne extends Thread {
    private int x = 2;

    public static void main(String[] args) throws Exception {
        new DemoOne().makeItSo();
    }

    public DemoOne() {
        x = 4;
        start();
    }

    public void makeItSo() throws Exception {
        join();
        x = x - 1;
        System.out.println(x);
    }

    public void run() {
        x *= 2;
    }
}
